package com.eupmt.lab3.domain;

import com.eupmt.lab3.domain.ibator.IbatorRol;
import static com.eupmt.lab3.utils.Constants.*;

public class Rol extends IbatorRol {

   //Atributs
   //Constructors
   public Rol() {
      super();
      setIdrol(UNDEFINED);
   }

   //Overrides
   @Override
   public boolean equals(Object o) {
      return (o != null) && (o instanceof Rol) &&
              (getNom().equals(((Rol) o).getNom()));
   }

   @Override
   public String toString() {
      String str = super.toString();
      str += "Rol.\n";
      str += "-id:" + getIdrol() + "\n";
      str += "-nom:" + getNom() + "\n";
      str += "-grauAcces:" + getGrauacces() + "\n";
      return str;
   }

   @Override
   public int hashCode() {
      int hash = 7;
      return hash;
   }
}
